Skip to content

support jpg format#11

Open
zhongkaifu wants to merge 3 commits intomainfrom
feature/support_jpg_format
Open

support jpg format#11
zhongkaifu wants to merge 3 commits intomainfrom
feature/support_jpg_format

Conversation

@zhongkaifu
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6c15d00c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +74 to +75
DecodeJPEG(fileBytes, out int width, out int height);
return (width, height);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse JPEG headers instead of full decode for dimensions

Gemma3ImageProcessor.ReadImageDimensions now calls DecodeJPEG just to read width/height, which allocates a full RGBA buffer for every JPEG (width * height * 4) and then throws it away. This path is used during token-count expansion before inference (e.g., ModelService loops all msg.ImagePaths), so large or multiple JPEG inputs now incur an extra full decode and substantial transient memory pressure compared with the previous header-only PNG path, increasing latency and OOM risk for multimodal requests.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant